import { RequestConfig, REQMethods, REQParamsType } from '@jsjn/types/Request'

// 公用
const commonMapping: Array<RequestConfig> = [
    {
        // 获取用户信息
        name: 'getUserInfo',
        api: 'kinso-auth-webmvc-login-server/info/userInfo',
        method: REQMethods.GET
    },
    {
        // 获取图片流
        name: 'getImgStream',
        api: 'kinso-basic-open-server/v1/document/image/download',
        method: REQMethods.GET,
        paramType: REQParamsType.QUERY,
        axiosRequestConfig: {
            responseType: 'blob'
        }
    },
    {
        // 获取文件流
        name: 'getFileStream',
        api: 'kinso-basic-open-server/v1/document/file/download',
        method: REQMethods.GET,
        paramType: REQParamsType.QUERY,
        axiosRequestConfig: {
            responseType: 'blob'
        }
    }
]

export default [...commonMapping]
